package com.nwu.evaluation.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 量表元数据表，依赖evaluation1
 * @TableName evaluation2
 */
@TableName(value ="evaluation2")
@Data
public class Evaluation2 implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 量表介绍
     */
    private String tableIntroduction;

    /**
     * 问题介绍
     */
    private String questionIntroduction;

    /**
     * 量表名称
     */
    private String tableName;

    /**
     * 外键依赖测评方向
     */
    private Long evaluation1Id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Evaluation2 other = (Evaluation2) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTableIntroduction() == null ? other.getTableIntroduction() == null : this.getTableIntroduction().equals(other.getTableIntroduction()))
            && (this.getQuestionIntroduction() == null ? other.getQuestionIntroduction() == null : this.getQuestionIntroduction().equals(other.getQuestionIntroduction()))
            && (this.getTableName() == null ? other.getTableName() == null : this.getTableName().equals(other.getTableName()))
            && (this.getEvaluation1Id() == null ? other.getEvaluation1Id() == null : this.getEvaluation1Id().equals(other.getEvaluation1Id()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTableIntroduction() == null) ? 0 : getTableIntroduction().hashCode());
        result = prime * result + ((getQuestionIntroduction() == null) ? 0 : getQuestionIntroduction().hashCode());
        result = prime * result + ((getTableName() == null) ? 0 : getTableName().hashCode());
        result = prime * result + ((getEvaluation1Id() == null) ? 0 : getEvaluation1Id().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", tableIntroduction=").append(tableIntroduction);
        sb.append(", questionIntroduction=").append(questionIntroduction);
        sb.append(", tableName=").append(tableName);
        sb.append(", evaluation1Id=").append(evaluation1Id);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}